package avicit.bdp.dds.api.service;


import avicit.bdp.common.base.BaseService;
import avicit.bdp.dds.api.enums.ProjectTypeEnum;
import avicit.bdp.dds.dao.entity.ProjectType;
import avicit.bdp.dds.dao.mapper.ProjectTypeMapper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * project type service
 **/
@Service
public class ProjectTypeService extends BaseService<ProjectTypeMapper, ProjectType> {

    private static final Logger logger = LoggerFactory.getLogger(ProjectTypeService.class);

    public List<ProjectType> getProcessTypeList(String projectType) {
        if(StringUtils.isBlank(projectType)){
            projectType = ProjectTypeEnum.DATA_DEV.getCode();
        }

        return this.mapper.getProcessTypeList(projectType, null);
    }

    public List<ProjectType> getProcessTypeList(String projectType, Integer authType) {
        return this.mapper.getProcessTypeList(projectType, authType);
    }
}
